//
//  BPDateFormatter.h
//  BPKITsDemo
//
//  Created by LiHaozhen on 14/12/15.
//  Copyright (c) 2014年 ihojin. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
 *  日期格式化类型
 */
typedef NS_ENUM(NSUInteger, BPDateFormatterStyle){
    /**
     *  yyyy-MM-dd HH:mm:ss
     */
    BPDateFormatterStyleDefault,
    /**
     *  yyyy-MM-dd
     */
    BPDateFormatterStyle_2,
    /**
     *  yyyy年MM月dd日
     */
    BPDateFormatterStyle_3,
    
    /**
     *  yyyyMMdd
     */
    BPDateFormatterStyle_4,
    
    /**
     *  yyyyMMddHHmmss
     */
    BPDateFormatterStyle_5,
    
    /**
     *  HH:mm
     */
    BPDateFormatterStyle_6,
    
    /**
     *  HH:mm:ss
     */
    BPDateFormatterStyle_7,
    /**
     *  mm:ss
     */
    BPDateFormatterStyle_8,
    /**
     *  ss
     */
    BPDateFormatterStyle_9,
    /**
     *  yyyy.MM.dd
     */
    BPDateFormatterStyle_10,
    
    /**
     *  MM月dd日
     */
    BPDateFormatterStyle_11,
    /**
     * yyyyMMdd_HHmmss
     */
    BPDateFormatterStyle_12,
    
    /**
     HHmmss
     */
    BPDateFormatterStyle_13,
    /**
     yyyy.MM.dd HH:mm:ss
     */
    BPDateFormatterStyle_14,
    /**
     MM-dd
     */
    BPDateFormatterStyle_15,
    /**
     yyyy年MM月
     */
    BPDateFormatterStyle_16,
    /**
     *  yyyy/MM/dd HH:mm:ss
     */
     BPDateFormatterStyle_17,
    /**
     *  yyyy/M/d H:mm
     */
     BPDateFormatterStyle_18,
    /**
     *  yyyy/MM/dd
     */
    BPDateFormatterStyle_19,
    /**
     *  yyyy
     */
    BPDateFormatterStyle_20,
    /**
     *  MM/dd
     */
    BPDateFormatterStyle_21,
};

typedef NS_ENUM(NSInteger, BPDateCompareResult) {
    
    BPDateCompareResultBefore,
    BPDateCompareResultValid,
    BPDateCompareResultAfter
};

@interface BPDateRange : NSObject

@property (copy, nonatomic) NSDate *startDate;
@property (copy, nonatomic) NSDate *endDate;

- (instancetype)initWithStartDate:(NSDate *)start endDate:(NSDate *)end;

- (BPDateCompareResult)compareDate:(NSDate *)date;
@end

@interface BPDateFormatter : NSObject

+ (NSDate *)dateFromString:(NSString *)dateString fmtStyle:(BPDateFormatterStyle)style;
+ (NSString *)stringFromDate:(NSDate *)date fmtStyle:(BPDateFormatterStyle)style;

+ (NSString *)getCurrentTimeWithFmtStyle:(BPDateFormatterStyle)style;
@end
